package fm.dongman.modellib.model;

import android.os.Parcel;
import android.os.Parcelable;

import fm.dongman.animefm.contractlib.IModel;

/**
 * 文章模型
 * Created by Admin on 2017/9/28.
 */

public class ArticleModel implements IModel.IArticleModel {

    //文章id
    private String mArticleId;

    //浏览次数
    private String mBrowseCount;

    //收藏次数
    private String mCommentCount;

    //创建时间
    private String mCreateTime;

    //图片
    private String mImgUrl;

    //简介
    private String mSummary;

    //标题
    private String mTitle;

    //文章来源（用户）
    private String mUserSource;

    //文章地址
    private String mArticleURL;

    //缩略图
    private String[] mThumbs;

    //来源地址
    private String mSourceURL;

    private String mType;

    public ArticleModel(){};

    public ArticleModel (String mArticleId,String mBrowseCount,String mCommentCount,String mCreateTime,String mImgUrl,String mSummary,String Title,String mUserSource)
    {
        this.mTitle = Title;
        this.mArticleId = mArticleId;
        this.mBrowseCount = mBrowseCount;
        this.mCommentCount = mCommentCount;
        this.mCreateTime = mCreateTime;
        this.mImgUrl = mImgUrl;
        this.mSummary = mSummary;
        this.mUserSource = mUserSource;
    }

    public String getUserSource() {
        return mUserSource;
    }

    public void setUserSource(String mUserSource) {
        this.mUserSource = mUserSource;
    }

    public String[] getThumbs() {
        return mThumbs;
    }

    public void setThumbs(String[] thumbs) {
        mThumbs = thumbs;
    }

    public String getSourceURL() {
        return mSourceURL;
    }

    public void setSourceURL(String sourceURL) {
        mSourceURL = sourceURL;
    }

    public String getArticleId() {
        return mArticleId;
    }

    public void setArticleId(String articleId) {
        mArticleId = articleId;
    }

    public String getBrowseCount() {
        return mBrowseCount;
    }

    public void setBrowseCount(String browseCount) {
        mBrowseCount = browseCount;
    }

    public String getCommentCount() {
        return mCommentCount;
    }

    public void setCommentCount(String commentCount) {
        mCommentCount = commentCount;
    }

    public String getCreateTime() {
        return mCreateTime;
    }

    public void setCreateTime(String createTime) {
        mCreateTime = createTime;
    }

    public String getImgUrl() {
        return mImgUrl;
    }

    public void setImgUrl(String imgUrl) {
        mImgUrl = imgUrl;
    }

    public String getSummary() {
        return mSummary;
    }

    public void setSummary(String summary) {
        mSummary = summary;
    }

    public String getTitle() {
        return mTitle;
    }

    public void setTitle(String title) {
        mTitle = title;
    }

    public String getType() {
        return mType;
    }

    public void setType(String type) {
        mType = type;
    }

    public String getArticleURL() {
        return mArticleURL;
    }

    public void setArticleURL(String articleURL) {
        mArticleURL = articleURL;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(mArticleId);
        dest.writeString(mBrowseCount);
        dest.writeString(mCommentCount);
        dest.writeString(mCreateTime);
        dest.writeString(mImgUrl);
        dest.writeString(mSummary);
        dest.writeString(mTitle);
        dest.writeString(mUserSource);
    }

    public static Parcelable.Creator<ArticleModel> CREATOR =new Creator<ArticleModel>() {
        @Override
        public ArticleModel createFromParcel(Parcel source) {
            ArticleModel model=new ArticleModel();
            model.setArticleId(source.readString());
            model.setBrowseCount(source.readString());
            model.setCommentCount(source.readString());
            model.setCreateTime(source.readString());
            model.setImgUrl(source.readString());
            model.setSummary(source.readString());
            model.setTitle(source.readString());
            model.setUserSource(source.readString());
            return model;
        }

        @Override
        public ArticleModel[] newArray(int size) {
            return new ArticleModel[size];
        }
    };
}
